#include "Hotel.h"

using namespace rapidxml;

const std::string Hotel::HOTEL_NODE = "hotel";
const std::string Hotel::HOTEL_NAME_NODE = "name";
const std::string Hotel::HOTEL_MAIL_NODE = "mail";

rapidxml::xml_node<>* Hotel::constructNode(rapidxml::xml_document<>* doc) const{
	xml_node<>* hotelNode = doc->allocate_node(node_element, Hotel::HOTEL_NODE.c_str());

	xml_node<>* nameNode = doc->allocate_node(node_element, Hotel::HOTEL_NAME_NODE.c_str(), getName()->c_str());
	xml_node<>* mailNode = doc->allocate_node(node_element, Hotel::HOTEL_MAIL_NODE.c_str(), getMail()->c_str());

	hotelNode->append_node(nameNode);
	hotelNode->append_node(mailNode);

	return hotelNode;
}